home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKitArchive.mbox / mbox / 000113_zet@cip.e-tech…uni-erlangen.de_Thu Feb 3 02:02 MST 1994.msg < prev    next >
Internet Message Format  |  1994-10-30  |  4KB

  1. Received: from yvax.byu.edu by maine.et.byu.edu; Thu, 3 Feb 1994 02:02:57 -0700
  2. Return-Path: <zet@cip.e-technik.uni-erlangen.de>
  3. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-3 #4169)
  4.  id <01H8FKAZQJ348Y51TT@yvax.byu.edu>; Thu, 3 Feb 1994 02:02:49 MST
  5. Received: from alaska.et.byu.edu by yvax.byu.edu (PMDF V4.3-3 #4169)
  6.  id <01H8FKAWYV4G8Y51TZ@yvax.byu.edu>; Thu, 3 Feb 1994 02:02:45 MST
  7. Received: from yvax2.byu.edu by alaska.et.byu.edu; Thu,
  8.  3 Feb 1994 02:02:33 -0700
  9. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-3 #4169)
  10.  id <01H8FKAKKLV401AC09@yvax.byu.edu>; Thu, 3 Feb 1994 02:02:29 MST
  11. Received: from faui45.informatik.uni-erlangen.de by yvax.byu.edu
  12.  (PMDF V4.3-3 #4169) id <01H8FKAEKAW08Y52FA@yvax.byu.edu>; Thu,
  13.  3 Feb 1994 02:02:25 MST
  14. Received: from cipx.e-technik.uni-erlangen.de by uni-erlangen.de with SMTP; id
  15.  AA06740 (5.65c-6/7.3v-FAU); Thu, 3 Feb 1994 09:53:37 +0100
  16. Received: by cip.e-technik.uni-erlangen.de  (15.11/7.3g-FAU) id AA07699; Thu,
  17.  3 Feb 94 09:53:29 mez
  18. Date: Thu, 3 Feb 94 9:53:26 MEZ
  19. From: Juergen Zeller <zet@cip.e-technik.uni-erlangen.de>
  20. Subject: MiscPopUp
  21. To: misckit@byu.edu
  22. Cc: zet@cip.e-technik.uni-erlangen.de
  23. Message-Id: <9402030853.AA07699@cip.e-technik.uni-erlangen.de>
  24. Content-Transfer-Encoding: 7BIT
  25. Mailer: Elm [revision: 66.25]
  26. Status: RO
  27.  
  28. Hello,
  29.  
  30. I needed popup's with a changing number of items and did some
  31. quick-and-dirty-hacking, but I think that a solution of 
  32. this problem could be useful to the MiscKit-Community.
  33.  
  34. I have added a short header-file of a possible solution and I will look
  35. forward to many replies :-)
  36.  
  37. MfG,
  38. Jvrgen
  39. zet@cip.e-technik.uni-erlange.de
  40.  
  41. -------------------------snipp--------------------------------------------------
  42. //
  43. //      MiscPopUp.h -- palette class for a flexible PopUpList
  44. //
  45. //              A MiscPopUp manages a PopUpList with a variable number of entries.
  46. //              It allows a flexible setting of the selected item and offers access
  47. //              to the Cells by tag, index or string. It can switch to a non-selectable
  48. //              empty item.
  49. //
  50. //      This is an idea of Jvrgen Zeller, zet@cip.e-technik.uni-erlangen.de.
  51. //      Please drop me a mail if you have any additional ideas or if you want
  52. //      to join the development.
  53. //      
  54.  
  55. #import <appkit/PopUpList.h>
  56.  
  57.  
  58. @interface MiscPopUp : PopUpList
  59. {
  60.     id      triggerButton;
  61.     id      emptyTitle;
  62.     BOOL    emptyInUse;
  63. }
  64.  
  65.     // methods to switch to an item; return value is nil or the corresponding cell
  66.     - setToIndex:  (int)         anIndex;
  67.     - setToString: (const char*) aString;
  68.     - setToTag:    (int)         aTag;
  69.     - setToCell:                 aCell;
  70.  
  71.     // methods to query the selected item; return value is nil or the corresponding value
  72.     - (int)         selectedIndex;
  73.     - (const char*) selectedString;
  74.     - (int)         selectedTag;
  75.     -               selectedCell;
  76.  
  77.     // methods to get a cell; return value is nil or the corresponding cell
  78.     - getCellByIndex:  (int)        anIndex;
  79.     - getCellByString: (const char*) aString;
  80.     - getCellByTag:    (int)        aTag;
  81.  
  82.     // methods to remove an item; return value is nil or the corresponding cell
  83.     - removeByIndex:  (int)        anIndex;
  84.     - removeByString: (const char*) aString;
  85.     - removeByTag:    (int)        aTag;
  86.     - removeByCell:                aCell;
  87.  
  88.     // methods to handle the emptyTitle
  89.     - setEmptyTitle:   (const char*) aString;
  90.     - (const char*) emptyTitle;    
  91.     - setEmptyState: (int) value;
  92.     - (int) emptyState;
  93.     
  94.     // query number of items
  95.     - (int) itemCount;
  96.  
  97. @end
  98. ----------------------------------------snapp-----------------------------------